import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsOptional, MaxLength } from 'class-validator';

// Create message DTO
export class CreateMessageDto {
  @ApiProperty({ description: 'Message content', example: 'Hello, I would like to learn about philosophy' })
  @IsString({ message: 'content must be a string' })
  @IsNotEmpty({ message: 'content cannot be empty' })
  @MaxLength(2000, { message: 'Message content cannot exceed 2000 characters' })
  content: string;

  @ApiProperty({ description: 'Session ID', example: 'session_123' })
  @IsString({ message: 'sessionId must be a string' })
  @IsNotEmpty({ message: 'sessionId cannot be empty' })
  sessionId: string;

  @ApiPropertyOptional({ description: 'Message metadata', example: { type: 'text', source: 'user' } })
  @IsOptional()
  metadata?: any;
}
